Events

Event Handling

One of NOVA’s core features is the large variety of events you can use. With Java 8, you can bind functions to events like so:

events.on(RightClickEvent.class).bind(this::onRightClick);

To bind a function that function needs to have the class you bind with as parm, for example:

public void onRightClick(RightClickEvent evt) {
    System.out.println("Sending Packet: 1234");
    NovaBlock.networkManager.sync(this);
}

Available Events

Block Events

Item Events